package org.reenscape.skill;
import org.reenscape.model.*;
import org.reenscape.*;
import org.reenscape.lib.*;
import org.reenscape.updater.*;
public class RuneCrafting {

					public void Ruins(String RuneType, int X, int Y, PacketParser p3){
						p3.sendMessage("You hold the "+RuneType+" Talisman towards the mysterious ruins.");
						p3.sendMessage("You feel a powerful force take hold of you...");
						p3.Animation(0x33B);
						p3.teleportToX = X;
						p3.teleportToY = Y;
					}
					
					public void Craft(int xp, int runeid, String runeName, int required, PacketParser p3){
						int EssAmount = p3.GetXItemsInBag(1436);
						if(p3.playerLevel[20] >= required){
							if(EssAmount > 0){
								p3.Animation(791);
								p3.playerGfx(186, 2);
								for (int i = 0; i < EssAmount; i++) {
									p3.deleteItem(1436, p3.GetItemSlot(1436), 1);
								}
								p3.addItem(runeid, EssAmount);
								p3.addSkillXP((xp * EssAmount), 20);
								p3.sendMessage("You bind the temple's power into "+runeName+" Runes.");
							}
							else { p3.sendMessage("You do not have enough essence to craft runes.");}
						} else { p3.sendMessage("You need a Runecrafting level of "+required+" to make "+runeName+" runes.");}
					}

}